﻿using System;
using System.Collections.Generic;
using System.Text;
using Suk.Common;
using Suk.Interface;
using Suk.Models;
using Suk.Models.Admin;

namespace Suk.Service
{
    public class DatabaseService: IDatabaseInterface
    {
        public  void InitDatabase()
        {
            var db = AppData.GetInstance();

            db.DbMaintenance.CreateDatabase();

            //Create tables
            db.CodeFirst.InitTables(
                typeof(User),
                typeof(UserGroup),
                typeof(Menu),
                typeof(MenuGroupRelation),
                typeof(UserGroupRelation)
                );
        }
    }
}
